﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LoginServer
{
    public partial class LoginServer
    {
        ManagerMachine GetMachine(byte ID)
        {
            for (int i = 0; i < list_manager_machine.Count; i++)
            {
                if (list_manager_machine[i].Manager_ID == ID)
                    return list_manager_machine[i];
            }
            return null;
        }
        public ManagerMachine GetMachineHasTable(int TableID)
        {
            for (int i = 0; i < list_manager_machine.Count; i++)
            {
                if (list_manager_machine[i].CheckExist(TableID))
                    return list_manager_machine[i];
            }
            return null;
        }
        public ManagerMachine GetMachineHasRoom(int RoomID)
        {
            for (int i = 0; i < list_manager_machine.Count; i++)
            {
                if (list_manager_machine[i].CheckRoomExist(RoomID))
                    return list_manager_machine[i];
            }
            return null;
        }
    }
}
